#include<iostream>
#include<string.h>
#define MaxSize 50
using namespace std;
typedef char ElementType;
typedef int Position;
typedef struct SNode {
    ElementType Data;
    struct SNode *next; 
}Stack;

void InitStack(Stack *&s);
void DestoryStack(Stack *&s);
bool StackEmpty(Stack *s);
void Push(Stack *&s,ElementType e);
bool Pop(Stack *&s,ElementType &e);
bool GetTop(Stack *s,ElementType &e);

int main()
{
	Stack *s;
	char ch[MaxSize],e,e1;
	int i;
	InitStack(s);
	scanf("%s",ch);
	for(i=0;ch[i];i++){
		if(GetTop(s,e)==0)Push(s,ch[i]);
		else if(e==ch[i])Pop(s,e1);
		else Push(s,ch[i]);
	}
	if(GetTop(s,e)==0)cout<<"yes";
	else cout<<"no";
 } 
 void InitStack(Stack *&s){
    s=new Stack;
	s->next=NULL;
}
void DestoryStack(Stack *&s){
	Stack *p=s,*q=s->next;
	while(q!=NULL){
		delete p;
		p=q;
		q=p->next;
	}
	delete p;
}
bool StackEmpty(Stack *s){
	return (s->next==NULL);
}
void Push(Stack *&s,ElementType e){ 
    Stack* p;
    p=new Stack;
    p->Data=e;
    p->next=s->next;
	s->next=p; 
}

bool Pop(Stack *&s,ElementType &e){
	Stack *p;
	if(s->next==NULL)return false;
	p=s->next;
	e=p->Data;
	s->next=p->next;
	delete p;
	return true; 
}
bool GetTop(Stack *s,ElementType &e){
	if(s->next==NULL)return false;
	e=s->next->Data;
	return true;
}
